package com.eatme.web.common;

public class Page {

    public static final int DEFAULT_PAGE_SIZE = 20;

    private int pageSize;

    private int currentPage;

    private int pageIndex;

    private int startIndex;

    private int maxItems;

    public int getStartIndex() {
        return (currentPage-1)*pageSize;
    }

    public int getMaxItems() {
        return pageSize;
    }

    public int getPageIndex() {
        return (currentPage-1)*pageSize;
    }

    public int getPageSize() {
        return pageSize;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public Page(int pageSize, int currentPage) {
        this.pageSize = pageSize;
        this.currentPage = currentPage;
    }
    public Page() {
    }
}
